package com.dc.project.basics.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.dc.common.validated.DeleteGroup;
import com.dc.common.validated.InsertGroup;
import com.dc.common.validated.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * 类别表(BasCategory)实体类
 *
 * @author zhuangcy
 * @since 2021-06-11 14:39:52
 */
@TableName("bas_category")
@Data
@ApiModel(value = "类别表")
public class BasCategory implements Serializable {
    private static final long serialVersionUID = -50492911008550718L;
    /**
     * 类别id
     */
    @NotNull(message = "类别id不能为空", groups = {UpdateGroup.class, DeleteGroup.class})
    @TableId(value = "category_id", type = IdType.AUTO)
    @ApiModelProperty(name = "categoryId", value = "类别id")
    private Integer categoryId;
    /**
     * 父id
     */
    @TableField(value = "parent_id")
    @ApiModelProperty(name = "parentId", value = "父id")
    private Integer parentId;
    /**
     * 类别编码
     */
    @NotNull(message = "类别编码不能为空", groups = {UpdateGroup.class, InsertGroup.class})
    @TableField(value = "category_code")
    @ApiModelProperty(name = "categoryCode", value = "类别编码")
    private String categoryCode;
    /**
     * 类别名称
     */
    @NotNull(message = "类别名称不能为空", groups = {UpdateGroup.class, InsertGroup.class})
    @TableField(value = "category_name")
    @ApiModelProperty(name = "categoryName", value = "类别名称")
    private String categoryName;
    /**
     * 祖级列表
     */
    @TableField(value = "ancestors")
    @ApiModelProperty(name = "ancestors", value = "祖级列表")
    private String ancestors;
    /**
     * 状态（0正常 1停用）
     */
    @TableField(value = "status")
    @ApiModelProperty(name = "status", value = "状态（0正常 1停用）")
    private String status;
    /**
     * 删除标志（0代表存在 1代表删除）
     */
    @TableField(value = "del_flag")
    @ApiModelProperty(name = "delFlag", value = "删除标志（0代表存在 1代表删除）")
    private String delFlag;
    /**
     * 创建者id
     */
    @TableField(value = "created_id", fill = FieldFill.INSERT)
    @ApiModelProperty(name = "createdId", value = "创建者id")
    private Integer createdId;
    /**
     * 创建者
     */
    @TableField(value = "created_by", fill = FieldFill.INSERT)
    @ApiModelProperty(name = "createdBy", value = "创建者")
    private String createdBy;
    /**
     * 创建时间
     */
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    @ApiModelProperty(name = "createdTime", value = "创建时间")
    private Date createdTime;
    /**
     * 更新者id
     */
    @TableField(value = "updated_id", fill = FieldFill.UPDATE)
    @ApiModelProperty(name = "updatedId", value = "更新者id")
    private Integer updatedId;
    /**
     * 更新者
     */
    @TableField(value = "updated_by", fill = FieldFill.UPDATE)
    @ApiModelProperty(name = "updatedBy", value = "更新者")
    private String updatedBy;
    /**
     * 更新时间
     */
    @TableField(value = "updated_time", fill = FieldFill.UPDATE)
    @ApiModelProperty(name = "updatedTime", value = "更新时间")
    private Date updatedTime;


}